/*
 * @Author: HeAo
 * @Date: 2021-12-15 15:17:09
 * @LastEditTime: 2021-12-15 15:26:37
 * @LastEditors: HeAo
 * @Description: 
 * @FilePath: \甘肃农大-2021-12-12\study\day03\2-数组.js
 * 别乱动！
 */
let arr = ['zhangsan', 'lisi', 'wangwu']
arr.forEach(function (item, index) {
  console.log(index, item);
})
let arr1 = [
  { id: 1, name: '张三', gender: 'male' },
  { id: 2, name: '李四', gender: 'male' },
  { id: 3, name: '阿五', gender: 'female' },
  { id: 4, name: '小六', gender: 'female' },
]
let result = arr1.filter(function (item) {
  return item.gender == 'female'
})
console.log(result);
